<?php $form->setDefaults($filter->array); ?>

<?php
	echo jq_form_remote_tag(
		array(
			'url' => url_for('usuario/filter'),
			'update' => 'list'
		),
		array(
			'name' => 'form_filter_usuario',
			'id' => 'form_filter_usuario',
			'method' => 'post'
		)
	);
?>

<?php echo input_hidden_tag('filtro', 'ativo'); ?>


<table class="form">
	<tr><th colspan="6" class="title">Filtro</th></tr>
    <tr>
        <th><?php echo $form['prontuario']->renderLabel() ?></th>
        <td>
        	<?php
        		echo $form['prontuario']->render(
        			array(
        				'name' => 'filter[prontuario]'
        			)
        		)
        	?>
        </td>
        <th><?php echo $form['nome']->renderLabel() ?></th>
        <td>
        	<?php
        		echo $form['nome']->render(
        			array(
        				'name' => 'filter[nome]'
        			)
        		)
        	?>
        </td>
        <th><?php echo $form['cpf']->renderLabel() ?></th>
        <td>
        	<?php
        		echo $form['cpf']->render(
        			array(
        				'name' => 'filter[cpf]',
        				'class' => 'cpf'
        			)
        		)
        	?>
        </td>
    </tr>
    <tr>
        <th><?php echo $form['rg']->renderLabel() ?></th>
        <td>
        	<?php
        		echo $form['rg']->render(
        			array(
        				'name' => 'filter[rg]'
        			)
        		)
        	?>
        </td>
        <th><?php echo $form['data_nascimento']->renderLabel() ?></th>
        <td>
        	<?php
        		echo $form['data_nascimento']->render(
        			array(
        				'name' => 'filter[data_nascimento]',
        				'class' => 'date datepicker'
        				
        			)
        		)
        	?>
        </td>
        <th><?php echo $form['endereco']->renderLabel() ?></th>
        <td>
        	<?php
        		echo $form['endereco']->render(
        			array(
        				'name' => 'filter[endereco]'
        			)
        		)
        	?>
        </td>
    </tr>
    <tr>
        <th><?php echo $form['regiao']->renderLabel() ?></th>
        <td>
        	<?php
        		echo $form['regiao']->render(
        			array(
        				'name' => 'filter[regiao]'
        			)
        		)
        	?>
        </td>
        <th><?php echo $form['data_abertura']->renderLabel() ?></th>
        <td>
        	<?php
        		echo $form['data_abertura']->render(
        			array(
        				'name' => 'filter[data_abertura]',
        				'class' => 'date datepicker'
        			)
        		)
        	?>
        </td>
        <th><?php echo $form['data_cadastro']->renderLabel() ?></th>
        <td>
        	<?php
        		echo $form['data_cadastro']->render(
        			array(
        				'name' => 'filter[data_cadastro]',
        				'class' => 'date datepicker'
        			)
        		)
        	?>
        </td>
    </tr>
	<tr>
		<td colspan="6">
			<input type="submit" value=":: Filtrar ::" />
			&nbsp;
			<?php
    			echo jq_link_to_remote(
    				':: Limpar ::',
    				array(
    					'url' => $sf_context->getModuleName().'/filter',
    					'update' => 'conteudo'
    				),
    				array('class'=>'botao')
    			);
			?>
		</td>
	</tr>
</table>
</form>

<script type="text/javascript">
$(document).ready(function(){
	App.formatdata.upper();
});
</script>